﻿using Cdx.Ui.App_Start;
using Cdx.Ui.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Cdx.Ui.Commands
{
    public class CommandLoginBetaUser: CommandBase
    {
        public CommandLoginBetaUser(Model model) : base(model) { }

        public override void Execute()
        {
            string userName = "Beta User";

            if (Model.CurrentUser == null)
            {
                var commandCreate = new CommandCreateUser(Model, userName, string.Empty, true);
                commandCreate.Execute();

                var commandLogin = new CommandLogin(Model, userName, string.Empty);
                commandLogin.Execute();
            }
        }
    }
}